package com.youxin.busfoundation.bean.leads;


import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.youxin.busfoundation.common.GlobalConfig;
import com.youxin.busfoundation.utils.mybatis.BasePage;
import com.youxin.cpcenter.model.TbEntLeadsStat;
import com.youxin.foundation.utils.StringUtils;

/**
 * 线索池
 * @author yingde.cao
 *
 */
public class RequestLeadsPoolBean extends BasePage<Object> {
	
	@JsonProperty("begin_date")
	private long beginDate;
	@JsonProperty("end_date")
	private long endDate;
	
	@JsonProperty("follow_id")
	private long followId;
	@JsonProperty("ent_identify_id")
	private long entIdentifyId;
	
	@JsonIgnore
	private long entMemberId;
	
	public long getEntMemberId() {
		return entMemberId;
	}

	public void setEntMemberId(long entMemberId) {
		this.entMemberId = entMemberId;
	}

	private String by="id";
	@JsonProperty("order_by")
	private int orderBy=1;
	
	@JsonIgnore
	public String getOrderName() {
		if(orderBy==1) {
			return "desc";
		}
		return "asc";
	}
	
	public String getBy() {
		return StringUtils.isNullOrEmptySet(by,"id");
	}


	public void setBy(String by) {
		this.by = by;
	}


	public int getOrderBy() {
		return orderBy;
	}


	public void setOrderBy(int orderBy) {
		this.orderBy = orderBy;
	}


	public long getEntIdentifyId() {
		return entIdentifyId;
	}


	public void setEntIdentifyId(long entIdentifyId) {
		this.entIdentifyId = entIdentifyId;
	}

	private TbEntLeadsStat stat;
	
	public TbEntLeadsStat getStat() {
		return stat;
	}


	public void setStat(TbEntLeadsStat stat) {
		this.stat = stat;
	}


	public long getBeginDate() {
		return beginDate;
	}
	

	public void setBeginDate(long beginDate) {
		this.beginDate = beginDate;
	}

	public long getEndDate() {
		if(endDate>0)
		{
			return endDate+GlobalConfig.DAYS_MILLISECONDS;
		}
		return endDate;
	}

	public void setEndDate(long endDate) {
		this.endDate = endDate;
	}

	public long getFollowId() {
		return followId;
	}

	public void setFollowId(long followId) {
		this.followId = followId;
	}
	
	
}
